Skip to content

Conversation

@hdgarrood
Copy link
Collaborator

Haven't tested this yet.

@paf31
Copy link
Contributor

paf31 commented Dec 3, 2014

Looks good. If you can please test it, I can merge.

@hdgarrood
Copy link
Collaborator Author

Ok, I've tested it, and it worked for me in FF 33.0. I can do other browsers if you'd like.

@hdgarrood
Copy link
Collaborator Author

Also how do you feel about getCanvasElementByIdImpl being exported?

@garyb
Copy link
Member

garyb commented Dec 3, 2014

Looks solid to me, but yeah ideally getCanvasElementByIdImpl would be hidden.

@hdgarrood
Copy link
Collaborator Author

In that case, could you merge this and my other two PRs, and then I'll hide all the impl functions in one PR afterwards? Just so that I can do it all in one go.

garyb added a commit that referenced this pull request Dec 3, 2014
make getCanvasElementById safe, fixes #2
@garyb garyb merged commit 411e8d8 into purescript-web:master Dec 3, 2014
@hdgarrood hdgarrood deleted the safe-get-canvas-element branch December 3, 2014 11:12
@paf31
Copy link
Contributor

paf31 commented Dec 3, 2014

Oops, just noticed, the type of getCanvasElementByIdImpl is a bit wrong. The way I usually type these things (not the only way by any means) is to say something like:

forall r eff.
  Fn3
    String
    (CanvasElement -> r)
    r
    (Eff (canvas :: Canvas | eff) r)

In the current type, the a is underconstrained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants